# 建立二叉树并遍历
# by Nasa 2022-6-25

class Node:
    def __init__(self, value, left=None, right=None):
        self.value = value
        self.left = left
        self.right = right


def bianli(node):
    if node is None:
        return
    bianli(node.left)
    print(node.value)
    bianli(node.right)


if __name__ == '__main__':
    head = Node(1)
    head.left = Node(2)
    head.right = Node(3)
    head.left.left = Node(4)
    head.left.right = Node(5)
    head.left.right.left = Node(6)
    bianli(head)
